The police officer who was injured was "attacked by an immigrant with one of the hooks they use to clamber up the fence" as he tried to stop them, the statement said, adding the implement cut his earlobe. In order to get across, migrants often use hooks and shoes studded with nails.
Four of the migrants, meanwhile, were sent to hospital for minor injuries, it added. Mobile phone footage broadcast by Spanish media showed a group of migrants running through the streets of the city. They have since been taken to a migrant detention centre.
The barrier is composed of two six-metre-high (20-feet-high) fences, with criss-crossing steel cables in between. Melilla and Ceuta, another Spanish enclave nearly 400 kilometres (250 miles) away on the north coast of Africa, are often used as entry points into Europe for African migrants.